package com.sptpc.learnspring.repository;

import com.sptpc.learnspring.model.Order;
import org.springframework.data.jpa.repository.JpaRepository;

import java.time.LocalDateTime;
import java.util.List;

public interface OrderRepository extends JpaRepository<Order, Long> {

    List<Order> findOrdersByCustomerLike(String customer);

    List<Order> findOrdersByCreateTimeBetweenAndCustomer(LocalDateTime startTime, LocalDateTime endTime, String customer);

    Order findOrderById(Long id);
}
